package b_object;

/**
 * @author Cheng-02
 * @version V1.0
 * @Package b_object
 * @date 2024/4/1 下午1:14
 */
public class Test03 {
    public static void main(String[] args) throws CloneNotSupportedException {
        Person person = new Person("柚子",16);
        Object e=person.clone();//克隆了一个新对象
        Person p3=(Person)e;
        System.out.println(person==p3);//比较地址值 fasle
        System.out.println(person.equals(p3));//比较内容 true
    }
}
